package com.suke.czx.common.utils;

import cn.hutool.core.util.StrUtil;

/**
 * 应用模块名称: 枚举类
 * 代码描述: 导出文件枚举类
 * copyright: AUZAR ALL RIGHTS RESERVED
 * company: AUZAR
 *
 * @author: 颜米晨
 * @date: 2021/10/20 0:45
 */
public enum ExportTypeEnum {

    /**
     * 绩效
     */
    PERFORMANCE("PERFORMANCE", "绩效导出");

    private String type;
    private String statement;

    ExportTypeEnum(String type, String statement) {
        this.type = type;
        this.statement = statement;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStatement() {
        return statement;
    }

    public void setStatement(String statement) {
        this.statement = statement;
    }

    /**
     * 根据类型获取对应的枚举类
     *
     * @param type 报表类型
     * @return 枚举类
     */
    public static ExportTypeEnum getReportEnum(String type) {
        for (ExportTypeEnum report : ExportTypeEnum.values()) {
            if (StrUtil.equals(report.getType(), type)) {
                return report;
            }
        }
        return null;
    }

}
